from django.db import models
from model import BaseModel

# Create your models here.
class UserModel(BaseModel):
    username = models.CharField(max_length=20, unique=True, null=True, blank=True, verbose_name="用户名")
    password = models.CharField(max_length=20, null=True, blank=True, verbose_name="密码")
    email = models.EmailField(max_length=20, null=True, blank=True, verbose_name="邮箱")
    phone = models.CharField(max_length=20, null=True, blank=True, verbose_name="手机号")
    score = models.IntegerField(default=0, null=True,blank=True, verbose_name="积分")

    class Meta:
        db_table = "fg_user"
        verbose_name = "用户"
        verbose_name_plural = verbose_name

    def __str__(self):
        return self.username
